package cn.jobstart.controller;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;
import cn.jobstart.pubInter.exception.SkException;
import cn.jobstart.pubInter.IBaseService;
import cn.jobstart.pubInter.RestfulController;
import cn.jobstart.dto.PersonDTO;
import cn.jobstart.dto.PersonPageDTO;
import cn.jobstart.modelExt.PersonExt;
import cn.jobstart.searchExt.PersonSearchExt;
import cn.jobstart.service.IPersonService;
import cn.jobstart.vo.PersonDetailVO;
import cn.jobstart.vo.PersonListVO;
import cn.jobstart.vo.PersonDomainVO;
import cn.jobstart.vo.PersonDetailDomainVO;
import cn.jobstart.export.PersonDomainExport;
import cn.jobstart.controller.ApiManageController;
import org.springframework.validation.annotation.Validated;
import java.util.Set;
import java.util.HashSet;
import cn.jobstart.pubInter.exception.BusinessException;

/**
*    @author sunke
*    @Date 2023-09-06 15:00:20
*    @description PersonController      人才账号
*/
@Api(tags = "人才管理系统-人才账号相关", description = "人才账号相关接口")
@RestController(value ="personRestfulController")
@RequestMapping("/person/")
@Validated
public class PersonController extends ApiManageController<PersonDTO,PersonPageDTO,PersonExt, PersonSearchExt,PersonDomainVO,PersonDetailDomainVO,PersonDetailVO,PersonListVO,String> {

	@Resource(name = "personService")
	private IPersonService personService;



	@Override
	public IBaseService<PersonExt, PersonSearchExt,String> getBaseService() throws SkException {
		return personService;
	}

	@Override
	public String getBaseRoute() {
		return "/person/";
	}

	/**
	* 当前模板名称
	* @return
	*/
	@Override
	public String getModelName(){
		return "人才账号";
	}

	@Override
	public Class exportExcelClass() {
		return PersonDomainExport.class;
	}

	@Override
	public Set<String> totalMapSet() {
		Set totalMapSet=new HashSet();
		totalMapSet.add("count(person.p_id) as countNum");
		return totalMapSet;
	}


}